Various bugfixes and updated NuGet packages