fix report function