Fix depracated code.