fix 2 bugs in origin source