controls close on outside click