fixed error not defined bug...

hey, pls accept my very first pull request :-)