Fixed asynchronous bug