bug fixed in update_activity