fix function_spec