Fixed weird popup bug