Fix logic so it's useable in coreos