Fix 'ambiguous column name' bug.