bak before debug rewrite