Fix service stop crash