cleaning up a weird condition tree (thanks to terremoto from reddit).