Fix error when metric period is "eternity"

This closes #12 and #13. Fix contributed by @cesarpachon.