Merge fixes from dwaxe fork