Fixed bug preventing pages to be printed more than once