some fixes for code based on findings in newslint