get rid of assert (size >= 0) now that an explicit if (size < 0) is in the code.