Add a boolean check to stop multiple click events from firing concurrently