Fixed a debugging error, and modifed the console logging