Bug fix for updating