Adding some fail-safe to the history check