Merge pull request #3 from jdhok/develop

Add brackets around order by columns
Fix target dimensions in case of automatic join resolution'