Fix adding 'tags' attribute to return value in attributes function