Fix bug when trying to load active page