this doesn't close now if refresh is true