Fixed bug in fit section. Check on flux length was using flux.size. Now is using len(flux) [flux is a list!]