bug fixed for JDK6