Fixed bug in delay.