Fixing flushvar and debug statements