Fix endOf handling of no-arg and ms

Fixes #1913