use correct capture policy
fix bug in _hx_modf call