Fixed event callbacks in dotnet.