Fix short-circuit side-effects