Fixed java6 compatibility