Fix duplicate column bug