Corrected some bugs in the init-phase