bug sorted