fixed bug in dictionary