Fix various issues with column aliases, fixes #38