func::compile & some fixes