Fixed bug when using relative paths