fixes partially #2939
Merge pull request #2968 from digi604/fix-2939

fixes partially #2939