fixed asynchronization bugs