fix errors in And and Or code