fixed annoying c interop bugs