some broken tag stuff and slightly less broken max/minimize stuff