remove setTimeout and fix scroll to sync chat logs