Fix quality flaws: remove usage of depracated constructor.