Fixed cached resultset problem
Added parameter support