Workaround for mono bug (fixes #426)