Fix potential crash error on update.