Fixed issue with optional AND element