Some adjustments to callback handeling.