Fixed the bug in MemoryManagement, must now add memorylogs