Fix bound check
Partial implementation of sleep sets