more bug fixes for update()