adding sleep fixes everything