Fix segmentation fault on set_field actions