Bugfix for JDK 6