corrected bug on service and added some more debug logs