Slopes is really max slopes, use nbins=20 instead of 30
Move duration distrib plot earlier in code