Fixed compiler errors in Service.