fixed problem with matplotlib in tests