changes to better select the current last revision