changed fitting parameters. bug fixes