Quick fix: added sleep from time to api.py