undefined var warning fix..