Fix tag and group bugs