fix order problem when events occur in rapid succession (same JavaScript time)