Fixed run-time errors.