Prevent an issue where the wrong popup method is called