Fixed bugs in viewreports and userreports