Started tracking the order in which buttons are clicked.
Fixed the input ordering problem