Fixed misbehaving java apps