fix sleeping in bug516