Fix buffer being too small