fixing figure problem