fixed a couple huge circular buffer bugs