modify bugfix when patient number is changed