Added close control for popup