Fixes problem with Activity not setting the result