fixed a few bugs that crept in, turned off debug mode