Dirty fix for headers already sent