Bug in perfectObs function

when ctot was 0 the division ctot.age/ctot was NA