fix some issues that showed up in the logs.
Merge https://github.com/friendica/red into zpull