fixed a slight memory overrun