WIP: Bash if fix

There might be more changes necessary, but it's making progress