fixes for java and android