clone now normalizes matrix layout