Fixes #5737
Fixes #5630
Fixes #5774
Fixes #5202
Merge pull request #5858 from Zuhayr/master

Fixes