fixed bug with not assigning parameter to sql command