fix bug that overwrites custom form export's app_id
add app ordering (just for top level table; for now repeats not supported)