Found the bug with cancellable sleep