deprecation error fix