fix relative path logic