fixed logical and