inc_ad() is now working but redirect goes to page with lots of errors