Bug fixes at elementar matrix