Fix tag field

Several fixes to the recently added tags field.