Reserve less memory and minor fixes.