fix function block parsing