Fix bad Warning: Bad formed request converted PGSQL