Fixed warnings with matrices