fix bug undefined