Fixed encoding of pointers to scalars