Fix N matrix