fix bug affecting and()