Fix deprectation warning