fixed issue with query formatting in execute() and executemany()