Fixed Java types to compile correctly