You should post more code then what you did.
Give us all of the code of both classes. Most likely you overwrote the reference to the variable at some point because of bad scopes.