Fixed bugg smith matrix.