fix js bugs in transcode