Fixing JDK1.7 issues