Fix redirect encoding issue
Fix parent selection in directory utils