Fixing pagination direction