Fixed handling of no history