Fixed a small bug with the debug mode