Fix time comparison

fixes #26