Fixed segfault on path creation