Made TX state handling more explicit.