At a minimum, you need to provide sensible initial values, e.g. not 0 for variables that must not be 0.
More generally: