Fixed nosuchmethod in java 7