Custom Dispath

I have my add on working perfectly basically except after it completes it gets

this error. Everything still gets done that I need but I just dont know how to end the

script and have a success screen with no errors.

Warning[color=#000000][font=Tahoma, Arial, Verdana,]: Cannot modify header information - headers already sent by (output started at /home/groovysh/public_html/addons/erporders/controllers/admin/erporders_export.php:227) in [/font][/color]/home/groovysh/public_html/core/fn.control.php[color=#000000][font=Tahoma, Arial, Verdana,] on line [/font][/color]503

anyone any ideas?