fix commit buttons so they only render when needed