set active field for each page correctly