fix compatibility with JDK 1.6