Added code for closing case.