Fix for correct maximum capture duration

This is the fix for #132