Fixed CheckPath bug