Fixes to pages vector and constructor/destructor