java code fixes