fix and improve report parsing