bug fix resize plot