Misc Fixes

- fix (hopefully) for the apc issue with sessions per #1023
- duplicate key in the array, and and extra space