Fix a small problem with maxDuration