Fixes for native compiler