Fixed a bug that occurs when the fly does not sleep