Improves correction for active dot when last item is reached

Simplifies #231. See #189.