Fix return types of logical/equality operations.