fixed bugs by xml: previous and next