Fix #524. Arithmetic operator and where conditions don't play nice