fixed compatibility issue for JRE 6