porting back minor fix from cc.net