Fix issue #1. Initial history replace if there is no word