Fixed a bug where the wrong nr of graphs was drawn