Fix errors in init script.