Fixed bug in Service class