Modified to work on jdk7 fix