Fixed bug related to dirty workdir