Fix a bug in automatic updates