bug fix [undefined value]