slight fix to report code
various fixes