Removed redundant pattern matching