This fixes a bug where page attributes could overwrite internal variables leading to unwanted behaviour