Fix synchronous promise