Just a guess but is the tool number you are using fully defined in the tool table?
An old post on restoring.