Init function now returns correctly