fixed random popup bug