<p>Please consider taking a look at the function "addnewevents" which bypasses this issue by doing the updating once for as many events as needed, while dealing with various issues. </p>