fixed bug regarding reversing lists