Fixed bugs and made Report encode parameters correctly.