Fix some input value oddities

Along with the issue mentioned towards the end of #107, this fixes a previously unreported bug where if you change the casing of a letter in your query, the hint would get messed up.