Fix for prev/nex button code from js-bottom