fixed compile errors with jdk1.6