Tweaked to work with latest CVS.