bugfix figure generation