bugfix sorting