Changes suggested by taa01776 in #112