fix issue at stopping service when it has not been started