fix logic of BooleanFromDouble class