bug fix on init