fixed bug in lm.pfit  thanks: Yong Hao Pua <puayonghao@gmail.com>