Fixed error passing to callbacks