Fix conditionals in various scripts