[minor] Fixed undefined variables errors

Fixed some undefined variables errors