Fix a bug in figure command