Fixes per @keoko's suggestions