Small detail: I'd prefer to have the conversion to int happen where we set the variable, because then that way we know that if we need to use `$sticky_pos` anywhere else in the future, that'll be consistent/safe.

I like that presence of the checking though -- just in case :)