fixed few bugs in service generation