small compatibility change for IPython 2