corrects paths etc.