Fixed a bug in service management