Fix bug by only putting reads or writes in objthrdmap