Add proper lua api deprecated handling