Modal now show and hide correctly