Trying to make emoticons behave, 2nd round

I've wrapped my head around what went wrong yesterday (sorry about that), and I think I've come up with a better fix... well, at least I've tested the code this time, and it *looks* like it could actually work!