Fix relative path resolve loop