More fixes for promise