Added fixes to prevent plot creation for situations when there is only one replicate in a repgroup.