Fixed synchronous code into asynchronic