fixed to be compiled on Java 6