Promise handling improved