Minor tweak in NumberEncoder
Fixed a bug introduced in commit c601b11