Fixed empty dir error.