fixed a bug in service behavior