Makes previous and next menu button work