added dual pagination for displaying canvas and also displaying pictures.
fixed pagination bug for canvas