Fixed helper function

check-expects, fixed them, and made it convert properly.