Fix #231 improve parent directory