fix a bug on initial value