Improved the update model (thanks @jurianeven)