bug fix in makenil function

was not behaving properly under some conditions - now added break after
printing