made the next and prev buttons work better
fixed merge