minor bug fix in old main