Fixed error that caused infinite loop.
Reset maxDelta to a more normal value.