ok now it deal with nils in the scale function