Fix removal of missing keys