fixed a bug that caused service dependencies not to be returned if it was not a function