fixes to arg passing and exception throwing