fixed errors that arose from last merge.