Fix undefined variable. #1270 Props @abeel