fixes #2738

Code is tested on live environment, but unit tests did'nt run. Not possible right now.