fixed bug when dir is called on Dict object