Empty input handling

Also tighten timing.