fixed popup bug