Fixed the double popup on button press