small undefined error removed