Fix for $or operator bug

thanks @stfciz!