Debug var resetting not working