Error because of using a wrong reference in lambda debig message