Add onended callback for streams
0.4.1