Fixing some problems with "Foreign" not compiling.