bug fixes to pkfit class