fix for methods using this to return value, tested with mocha