Fixed error in closure