fix leave and arrive problme