more memory allocation checks