fix bug when directory has space