fixes per @gama11's recommendations