fixed compatipility with java 1.6