fix anonymous function