Fix some types. (Integer promotion is tricky)