resolve path correctly