Fix problem with functions in the WHERE clause.  Remove debug echo