fix path basename problem