Fixing bug in service.rb