fix init process
try to fix test code bugs