Fixed Debug Mode Bug