correction in pages and add active class