fix bug on init