fix for #483

Fixes issues with pagesArray being manipulated detrimentally