work around matplotlib bug