Fixed get_path() function