fix bug to show figure