fixed the relative paths bug pointed out by Alberto Accomazzi