Fixed and/& logic error