fix keyerror path