Fixes app_id-based bugs from #11.