Fixing Java 6 integer parsing issues