fix java errors