fix bug java 1.6
fix cast java 1.6