cast maxDepth to unsigned long to avoid error

This had an issue with the "Values of type NSUInteger should not be used as format argument; add an explicit case to 'unsigned long' instead" error - this will work for 32 bit or 64 bit.