Used new debug everywhere, fixed error