fixing handling of rapid input