Minor bug fix in check_deprecated