Fix detection of whther to run setup