Haba patch to prevent crash of lprod-slave.
Merge commit 'fb537f2fe87a122a6cd1e3538bdd0ac83b163d17'
Warnings removed.