fixed tag problem ordering in next/previous buttons