Fixing service.js issue