Fix evaluate_promise to return actual value

There seems to be a minor issue with the evaluate_promise function such
that the result value is never returned. After debugging it seems that
the problem is caused by the result name for the result object not
present (always causing to return NULL) and instead the actual value is
is held in the value name for the result object.