fixing bug related to F_escape_sql