Add Fixes suggested by Sebastian Bergmann

Adds Fixes suggested by Sebastian Bergmann in your pull https://github.com/joomla/joomla-cms/pull/4699