fixed bug in aging code