Some changes in alignment parameters logic
Alignment matrix bugfix