Fix VS compile errors