Better handling of invalid bbox (#246)