bug fixing about path generation