Fixup some errors and warnings