typo fix and extra checks.