Fixes `for` loop error when using limit or offset

Don't use undefined set method when setting for tag attributes. Instead directly define attributes object properties.