Fixed updating bugs