fixing popup callback