fix a couple type errors