fixing some of the debug errors