Queries with parameters not updating