fixed java cleanup