sphinx error cleanup