Fix bugs in monoOS