Fix encoding of small constants