Fixes bug in subpage creation