fixes in light of @andrewjstone comments