Fix for backwards compatibility until IPython merges my relevant PR.