Add missing commas to array in query builder