Resolve problem with popup hide