Fixing sleep in shim