fix order of short-circuiting operators