Changing query builder endStatement() to reflct changes in mango