fixed some errors regarding lambda