fix short-circuiting && and ||