various small fixups and stuff