fix bugs with results