fixed writing config in init