fix the lambda function bug in Room.cpp capture function