Deprecated fix and tests