fixed bug with reversing a padded sequence