Fix #407 tag panel not saving. Fix related crashes