Added afterInit callback