attach active page last so it is on top