Life is pain. This code is mono-compatible.

Not tested. Old code too. Yea...