Fix alias problems in select queries
Merge remote-tracking branch 'origin/develop' into develop