fix a bug regarding init