fix bug with function-type