Fixes all of the java 1.6 vs 1.7 problems