Germany through after Algeria scare