fixed #2536

@vigsterkr made the notebook run faster, this will probably fix #2536