fixed stupid bug in plot creation