bug fix in linear number encoder