[BUG] Fixed some bugs left by merging

And a bug preventing memory_usage() to be used with stream=None.