fix so that is promise is rejected correctly.