black magic to make the reporting modal work