Corrected key deletion on leave