fixed bug in linearLayerAlignment, calculate and apply the desired Model