Added sleep to make javascript tests pass