fix path for key removal in apply