fixing race conditions when updating package data