Mem ostream fix