fixed bug in function block