Fixed input so that it was event-based.