Close #59. Fix stub deprecation