ported memory zone fixes from devel