Made input work according to changes in JavaLib (with resume states)