fix parsing missing closing brace
parse fn apply