fixes to not fail on estimate memory size