Logic improvement.

Fixed a would-be issue, demonstration of a dynamic sleep.