Fixes next/previous buttons order