Better handling of inconsistent input