Java bug fix