sort lists before comparing them to avoid flickering test