Fixed java errors