Changing method of deleting session element (msgHash).