Fixed problems with compiling to native code