fix trivial bugs for helper and add helper member function to IR emitter
helper