fix a mistake of using dict