Fixes compile error in Java 6 where it can't infer types correctly try #3.