fix bug: root dir is not set correctly