Modal closing uses promise