fixed small problem with generating the result page