fix figure bug