You should probably do result.set_valid(true) as well