Fix #1432 and a couple type errors in the same file