bug fix for 'previous'