clash of clans - fixed NaN/null bug and added auto-select of text in inputs