fixed incorrect figure command handling