Using fields() didn't work correctly outside of flash - casting to an array seems to work everywhere.