popup close bugfixes