Fixing potential move and assignment problems in value_or_error
Fixed move related problems in future