fix possible extra comma before where statement (#1924)