pwl bug fixed