fix base dir issue