Fixed for OS X support (JDK 1.6)