Added's Gilbert's fix, and program still works.