Fix bug in relative_path method