fix accidently opening a new Figure and creating emtpy plots