Fix some warnings generated by sanitychecks.py