clean up the offending code

Use `&&` instead of `and`.