Fix issue with new memory structure