Fixed some bugs with java bindings
Merge pull request #29 from sradomski/master

Fixed some bugs with java bindings