MZ RusShm's Mouse System MZ [1.2] causing error when changing maps

I am trying to make an adventure game where clicking on doors and paths takes you to different areas/maps. This is the current plugin I'm using- RusShm's Mouse System MZ [1.2].

The error appears as either -
"Uncaught type error: cannot read property of pages undefined"
Or
"Uncaught type error: cannot read property 'scroll type' of null"

This is what shows on the console

The error doesn't happen often when testing. But I'm also trying to implement a system where time changes as you move through each map. I've replaced the time variable for health just to test it out. This is the script. This actually worked one single time before consistently showing the same Uncaught type error.

My main issue is just the errors appearing with the plugin. I'd also like help with the script for changing a variable when changing maps but that is a secondary priority. If the plugin cannot be fixed, I would also appreciate recommendations for other MZ mouse plugins. Thanks in advance.
your console is wrong as its more the html page, not console log.
do your event use comment tags?

but on the tileX/Y is the number of the event "657" which I don't know
what it does as most events uses 208 and 40X to check for comment tags.

so check your events if it uses comment tag correctly or the console log.

Original thread: https://forums.rpgmakerweb.com/threads/russhms-mouse-system-mz-1-2-causing-error-when-changing-maps.181321/