Fix for jdk 1.6. Issue #420