Added necessary checks.