fix "expected to be a reference, value given" warning

closes #41