Fixed the linearity bug