Fixing spatial_function_defs