fix for #441 from @dak8