fixed bug in answer sort logic