fix butterfly bug in dictionary