fixed #5699 and #5700

https://bugs.oxid-esales.com/view.php?id=5699
https://bugs.oxid-esales.com/view.php?id=5700