fixes problem with console testing for sorting