Minor code cleanup in error message