fix bug with prev revision