close td on errors too