fix last_path