Fixed errors in the closure declaration