fixed small bug in LG4X model when writeVector is set to TRUE