Fixed handling of optional classes passed to buttons/anchors