fixed timing bug in set item