Fixing copy/paste error in error check.