temporary workaround for read with a length > 65536