(bug) Added sleep to reduce CPU use.