Fixes for Mono compatibility