CORE-4066: fixed a bug in the service