fixing last pages