Use the AVAIL_OUT_SIZE() macro in a few more places to ensure