Fixed bugs in plot creations