fixed a bufferoverrun