fixed incorrect lambda capture

references to locals were being captured, when it should've been capture by value