Ensuring number conversion for buffers