Fix undefined var