Fix unioning more than 1 query
Set the app key in the config after updating it
Merge pull request #2572 from GrahamCampbell/4.0

Set the app key in the config after updating it
Check null.
Merge pull request #2559 from maddhatter/fix-multi-unions

[4.0] Fix unioning more than 1 query