fix relative paths calculation