fixed fitting bug