Modified fixes from Arcane.