Double click the flag for better performance
Thanks to @nicoleit's "PING-PONG" project for the direction reversal idea.