Fixed bug in handling of result and exception propagation