fixed a wrong argument for sql-func.