added security fix for combined return data and this(null, data) inside generator function