Fix issue with Java