some code fixes java7