Simplify the code.

Thanks to David Balkie for the suggestion.