Minor code improvements of dict.c

All testes passed.