fix crash issue: do not use a instance during initialization