bug fix: fitting working