Add UT for FrameStream, fix rendering bugs