fix update function for initial update