fix the deprecated issue