removing pages properly