fixed bug in calculating base for relative paths