bug fix adding to dictionary