Fixed bug when trying to run VAR on factor columns.