Fix table alias issue