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