fixed proc file with update query