#760 Fix spelling and logic mistakes