Missing check for uisource. Fixes #4398
Merge pull request #4405 from juztas/ui_fix

Missing check for uisource. Fixes #4398