fixed JAVA ACCESS VIOLATION EXCEPTION in JVM (1.7.0_07 < JVM version <=  1.7.0_25) and small memory leak
Merge pull request #3 from dermetfan/master

fixed JAVA ACCESS VIOLATION EXCEPTION in JVM (1.7.0_07 < JVM version <= ...