Make catch more flexible