fix bug in dictionary