fix get basename bug