Problems with memory flow fixed