Doop
Slightly changed the foreach API funcs.
Added a check to see if native functions return a valid number of results (before this just crashed the VM, oops)