Page toggeling detection seems to work now