Fix bug using with popwin