fixes from @ddtrejo