Changes from @emfree's CR