fixed problem with complex matrix output