some fixes to delay spilling over the max time
Merge branch 'develop'