probably fixes second part of https://github.com/zrho/afp/issues/145
simplification
Merge pull request #147 from jvoigtlaender/fix-popup

probably fixes second part of https://github.com/zrho/afp/issues/145