Fixed incorrect checking of service existence.