added fix for bug if you had an empty wordfile