Fix use of deprecated features