fixed a bug that occurs when compile with JDK 6