Fixes from @lpw25