Fixed bugs in plot_four_patterns