repair deprecated functions