Fixed the detection method of the length of tags_params.