Make code Java 6 conform, thanks to Niklaus Giger