Fixes for support for java 8

- After #17