fixed bug in passing primitive arrays through native function handles