Fix broken create/shutdown code