Changed callback type in prepare_latest