fixed error in removing cases