Change the code order to make "Q" works