Fix bug in simple fit program