Fix using promise