fixed missing reject for promise