Fixed problems affecting native compilation