Fixed some bugs on update of stats for context items