Fixed a bug which caused the sample not to be sent when the timer elapses