Fixed a bug with automatic updating