fixes #1976 and #1957
Merge branch 'fix-1971' into fix-1976
Merge pull request #1984 from digi604/fix-1976

Fix 1976