Fixing Java complaints