Some fixes discovered with xamarin!