Added stream buffering, gif workaround in wrapper.