Bugfix in FunctionRepository