shouldn't you check whether the variable is defined ?