fix type issues in update