Fixed histogram when invalid data present (invalid data excluded, warning issued)