v0.5

Sleep conditions and bug fixes.