fixed the facilities for handling data of the wrong shape for fit()