Fixes for jdk6