Some cleanup of error code an reactivation of init hooks