removing a bug from polyfit