Fix compiler warnings.
Fix initial maxslot for down-recursive traces.
Fix OSX build issue.