Fixed errors in callbacks