Fixes NullPointerException during update. Fixes #1484