Added more persistent memory handling