Small bug fix for fit, if no valid lattice is found