moved rewrite flushing to admin_init, currently was being done on script printing - a bug