temporary solution. Add threads to fix it.