Bug history buffer owerflow

work now