small bugfix - method was returning reference to function local variable