fix deprivated types and functions