Fixed test and added callbacks.