minor bug fix, undefined values