fix check for clean working copy