Fixes from bugherd