removed erroneous calls to pg escape string inside of isset