adding in debug, as well as fixing an issue