Fixed some automated page generation bugs