fix($resource): functions in params should not be executed if overridden