Corrected sleep bug