Fix broken memory testing