address scrutinizer's complaints (and one actual bug)