fix bug with scaling and transposing model