Fix build() streaming and stream methods cleanup

Signed-off-by: Maxime Petazzoni <max@signalfuse.com>