Works with Java 1.6 again and fixed another NPE