Fixed a bug in the init process