fix for https://github.com/Project60/sepa_dd/issues/116 and https://github.com/Project60/sepa_dd/issues/126