fixed a compile error on java 6