fixed bug where selecting the same source several times in a row would cause a crash
Merge branch 'dev'