Call onChange only if a page actually changes