Fixed a bug in mono-service.cs (#17095)