Made compatible with JRE 1.6