Added an optional command delay.