Update sleep functions to work.