Fix for issue #2334835 reported by @yareckon: trimming API key before sa...

...ving