Fix code problems to work with all reports(in test mode now)