fixes some issues with update