Short circuit boolean logic - fixes #411