fix java bug