fixed handling of strokes with invalid timestamps