next and prev example buggfix