fixing java 5 bug