fix answer generation