Debug for  compatibility to older versions of python and matplotlib