Fixed tenatn check