fixes buffer size, uses absolute values