fixed small bug in linear version